<include file="public:header" />
<div class="toptip">
    <div class="toptit">提示：</div>
    <p class="link_green_line">新增模板只需将模板文件上传至 /Application/Home/View/ 目录下，更多模版请到 <a href="http://www.74cms.com/tpl/lists.html" target="_blank" style="color:#009900">[官网]</a> 获取。</p>
    <p>使用与骑士CMS不同版本的模板易产生错误</p>
    <p class="link_green_line">如果您熟悉html语法，则可以参考 <a href="http://www.74cms.com/handbook" target="_blank" style="color:#009900">[模版开发手册]</a> 自定义风格模版。</p>
</div>
<div class="toptit">当前模板</div>
<table width="460" border="0" cellspacing="12" cellpadding="0" class="link_blue" style="padding-left:20px;font-size:12px;margin-bottom: 20px;" >
    <tr>
      <td width="225">
	  <img src="{$templates.thumb_dir}/Config/thumbnail.jpg" alt="{$templates.info.name}" width="225" height="136" border="1"  style="border: #CCCCCC;" />
	  </td>
      <td width="220" class="link_blue" style="line-height:180%">
	  名称：{$templates.info.name}<br />
        版本：{$templates.info.version}<br />
        作者：<a href="{$templates.info.authorurl}" target="_blank">{$templates.info.author}</a><br />
		模版ID：{$templates.dir}
		<br />
	  <input type="button" name="Submit22" value="备份此模板" class="admin_submit"    onclick="window.location='{:U('tpl/backup',array('tpl_name'=>$templates['dir']))}'"  style="margin-top:10px;"/>
	  </td>
    </tr>
  </table>
   <form id="form3" action="{:U('index')}" method="post">
    <div class="form_main width200">
        <div class="fl">主题选择:</div>
        <div class="fr">
            <div class="imgradio">
                <input name="theme_tpl" type="hidden" value="{:C('qscms_theme_tpl')}">
                <div class="radio <eq name='Think.config.qscms_theme_tpl' value='0'>select</eq>" data="0" title="默认">默认</div>
                <div class="radio <eq name='Think.config.qscms_theme_tpl' value='1'>select</eq>" data="1" title="春节">春节<a href="../public/images/index/holiday/chunjie.jpg" target="_blank"  style="color: #999999" title="点击查看">[预览]</a></div>
                <div class="radio <eq name='Think.config.qscms_theme_tpl' value='2'>select</eq>" data="2" title="端午">端午<a href="../public/images/index/holiday/duanwu.jpg" target="_blank"  style="color: #999999" title="点击查看">[预览]</a></div>
                <div class="radio <eq name='Think.config.qscms_theme_tpl' value='3'>select</eq>" data="3" title="五一">五一
                <a href="../public/images/index/holiday/laodong.jpg" target="_blank"  style="color: #999999" title="点击查看">[预览]</a></div>
                <div class="radio <eq name='Think.config.qscms_theme_tpl' value='4'>select</eq>" data="4" title="中秋">中秋<a href="../public/images/index/holiday/zhongqiu.jpg" target="_blank"  style="color: #999999" title="点击查看">[预览]</a></div>
                <div class="radio <eq name='Think.config.qscms_theme_tpl' value='5'>select</eq>" data="5" title="国庆">国庆<a href="../public/images/index/holiday/guoqing.jpg" target="_blank"  style="color: #999999" title="点击查看">[预览]</a></div>
                <div class="clear"></div>
            </div>
        </div>
        <div class="fl"></div>
        <div class="fr">
            <input type="button" class="admin_submit" value="保存修改" id="J_submit3"/>
        </div>
        <div class="clear"></div>
    </div>
</form>
	<div class="toptit">可用模板</div>
	<div style="padding-left:20px;font-size:12px;">
	<volist name="list" id="li">
	  <div style="float:left; width:240px;  text-align:center; padding:15px; line-height:180%;"  class="link_blue tpl_list">
	  <a href="{:U('set',array('tpl_dir'=>$li['dir']))}" onclick="return confirm('你确定要使用此模板吗？(提示：频繁更换模版会影响网站排名)')">
	  <img src="{$li.thumb_dir}/Config/thumbnail.jpg" alt="{$li.info.name}" width="225" height="136" border="1"  style="border: #CCCCCC;"/>
	  </a>
	  <br />
	 <strong>{$li.info.name}</strong>
	 <br />
	{$li.info.version} (作者:<a href="{$li.info.authorurl}" target="_blank">{$li.info.author}</a>)
	 <br />
	模版ID：{$li.dir}
	 </div>
	</volist>
	</div>
	<div class="clear"></div>
</div>
<include file="public:footer" />
<script type="text/javascript"> 
$(document).ready(function()
{
		$(".tpl_list").hover(
	  function () {
	    $(this).css("background-color","#E4F4FC");
	  },
	  function () {
	    $(this).css("background-color","");
	  }
	);
	$('#J_submit3').click(function(){
            var that = $(this);
            if(that.hasClass('disabled')){
                return false;
            }
            that.val('正在保存...').addClass('disabled');
            $.post("{:U('theme_tpl')}",$('#form3').serialize(),function(result){
                if(result.status==1){
                    disapperTooltip("success", result.msg,function(){
                        location.reload();
                    });
                }else{
                    disapperTooltip("remind", result.msg,function(){
                        that.val('保存').removeClass('disabled');
                    });
                    return false;
                }
            },'json');
        });
});
</script>
</body>
</html>